<?php

?>
    <fieldset  style="margin-top: 40px;">
        <legend>Payment of Other Services</legend>
    </fieldset>

    <div class="row-fluid" style="margin-bottom: 40px;">
        <div class="span6">
            <form class="students-config-form- form-horizontal" id="students-purchase-form" method="post" action="" enctype="" style="margin: 0px;">
                <div class="control-group">
                    <label class="control-label">Select Items:</label>
                    <div class="controls">
                        <?php echo $this->Form->input('select_items', array('id'=>'select_items', 'class' => 'input-block-level','options'=>$fee_types,'div' => false, 'label' => false)); ?>
                    </div>
                </div>
            </form>
            <div class="control-group">
                <div class="controls">
                    <button type="button" id="add-to-cart-btn" class="all-tool-tip btn btn-primary" data-placement="top" data-toggle="tooltip" title="" data-original-title="Click this button to add the current selected item to the cart. The more you click, the more the item's quantity increases in the cart and hence the total cost increases. Note that there are some items that have quantity limit and those limit will be applied when selecting more than one of those items.">Add To Cart</button>
                    <button type="button" id="remove-from-cart-btn" class="all-tool-tip btn" data-placement="top" data-toggle="tooltip" title="" data-original-title="Click this button to reduce and remove the current selected item from the cart. The more you click, the more the item's quantity reduces in the cart and hence the total cost reduces.">Remove From Cart</button>
                </div>
            </div>
        </div>
    </div>

    <fieldset  style="margin-top: 40px;">
        <legend style="margin-top: 40px; font-size: 18px;">Cart</legend>
    </fieldset>

    <div class="row-fluid">
        <div class="span12">
            <table class="table table-hover table-bordered">
                <thead>
                    <tr>
                        <th>Item</th>
                        <th>Quantity</th>
                        <th>Total Cost</th>
                    </tr>
                </thead>
                <tbody id="cart">
                </tbody>
            </table>
        </div>
    </div>

    <div class="row-fluid">
        <div class="span6">
            <div class="control-group">
                <div class="controls">
                    <button type="button" id="bill-me-now-btn" class="all-tool-tip  btn btn-primary" data-placement="top" data-toggle="tooltip" title="" data-original-title="By clicking this button, you will be billed the selected items in the cart, then proceed to make the actual payment.">Bill Me Now</button>
                    <button type="button" id="cancel-btn" class="all-tool-tip  btn " data-placement="top" data-toggle="tooltip" title="" data-original-title="Remove all items from the cart.">Clear Cart</button>
                </div>
            </div>
        </div>
    </div>

<input type="hidden" id="do-payment-url" value="<?php echo $this->Html->url(array('controller' => 'Student', 'action' => 'order')); ?>" />
<input type="hidden" id="current_academic_yr" value="<?php echo $current_academic_year;?>" />
<input type="hidden" id="index_number" value="<?php echo $auth_user['index_number'];?>" />
<input type="hidden" id="payment-url" value="<?php echo $this->Html->url(array('controller' => 'Student', 'action' => 'payments')); ?>" />


<script type="text/javascript">
    var global_item_data = <?php echo json_encode($gbl_fee_type); ?>;
    //console.log(global_item_data);
</script>

<?php
    echo $this->Html->script('student/order.js');
?>